<?php
namespace Weixin\Controller;
use Common\Controller\BaseController;
class RemindController extends BaseController{
    public function index(){
        $Weixin = new \Weixin\Controller\WeixinFuwuController();//实例化

        //调用场景值

        $result = $Weixin -> create_QRcode('604800',$_GET['way']);
        $path = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket='.$result['ticket'];
        $this -> assign('path',$path);

        $this -> display();

    }

    public function rank(){

        $user = M('user');
        $data['row'] =$user->where('username is not null') ->field('pk_id,username,(SELECT COUNT(*) FROM invite WHERE invite.invite_id = user.pk_id) AS num')->order('num desc') ->limit(10000)->select();
//         dump($user->getLastSql());

        $Weixin = new \Weixin\Controller\WeixinFuwuController();
        $data['wxKey'] = $Weixin->rtnQM();
        $this -> showView($data);
    }

}






























